﻿using System;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using Code.Models;
using QianBuo.Lottery.Web.Commen;

namespace QianBuo.Lottery.Web.Models.Play
{
    public class PlayModel
    {
        public string RatioName { get; set; }
        public double Ratio { get; set; }
        public string LotteryName { get; set; }
        public int ForwardEnd { get; set; }
        public int OpenWinDelay { get; set; }
        public int LotteryID { get; set; }
        public int? PlayID { get; set; }
        public double SingleBetMoney { get; set; }
        public ModelNameValue<int, NameValueItem<int,string>> PlayType { get; set; }
        public BetModel Bet { get; set; }
        public bool IsSinglePlay { get; set; }
        [Required(ErrorMessage="*")]
        public bool AccpetProtocol { get; set; }

        public int OpenCodeLen { get; set; }

        public bool BackMoneyToWinMoneyEnable { get; set; }

        public double BackMoneyToWinMoneyStep { get; set; }
    }

    public class BetModel
    {
        [Required(ErrorMessage="请选择投注的号码和倍数")]
        [Range(0.001, 999999999D, ErrorMessage = "请选择投注的号码和倍数")]
        public double SumMoney { get; set; }
        public int SingleMultiply { get; set; }
        [Required(ErrorMessage="本期已截止")]
        public int IssueID { get; set; }
        [Required]
        public bool Chase { get; set; }
        [Required]
        [DisplayName("中奖后终止")]
        public bool StopWin { get; set; }
        [Required(ErrorMessage="请选择您要投注的号码")]
        public string[] PlayList { get; set; }
        public long[] Chases { get; set; }
    }

    public class PlayTypeModel
    {
        public int ID { get; set; }
        public int PlayID { get; set; }
        public string Name { get; set; }
        public string InputFile { get; set; }
        public LotteryType Lottery { get; set; }
        public string Remark { get; set; }
    }

    public class VedioModel
    {
        public int LotteryID { get; set; }
        public string LotteryName { get; set; }
        public int OpenCodeLen { get; set; }
        public string StyleName { get; set; }
    }
}